import request from '@/utils/request';

const PRE_URL = '/market/coupon';

/**
 * 根据条件查询信息
 * @param {*} params
 */
export async function query(params) {
  return request(`${PRE_URL}/getByPage`, {
    method: 'POST',
    data: {
      ...params,
    },
  });
}

/**
 * 触发发券
 */
export async function sendCoupon() {
  return request(`${PRE_URL}/startDispatch`, {
    method: 'POST',
    data: {},
  });
}
/**
 * 补发券
 * @param {*} params
 */
export async function sendReissueCoupon(params) {
  return request(`${PRE_URL}/reissueCoupon`, {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
